import { http } from '@/utils/http.js'


/**
 * 获取手机验证码
 * @params data 请求参数 { mobile,type }
 */
export const sendCMSCodeAPI = (data) => {
	return http.get('/code', {params: data})
}

/**
 * 登录--手机验证码登录
 */
export const loginByCMSAPI = (data) => {
	return http.post('/login', data)
}



/**
 * 获取用户信息
 */
export const userInfoAPI = () => {
  return http.get('/patient/myUser')
}


/**
 * 问诊-添加患者信息
 */
export const addPatientAPI = (data) => {
	return http.post('/patient/add', data)
} 


/**
 * 获取患者（家庭档案）列表
 */

export const patientListAPI = (data) => {
  return http.get('/patient/mylist')
}

/**
 * 删除患者
 */
export const deletePatientAPI = (id) => {
  return http.delete(`/patient/del/${id}`)
}


/**
 * 获取患者详情
 */
export const getPatientDetailAPI = (id) => {
  return http.get(`/patient/info/${id}`)
}


/**
 * 编辑患者
 */
export const updatePatientAPI = (data) => {
  return http.put('/patient/update', data)
}

